import request from '@/utils/request'

// 查询模型收藏列表
export function listCollect(query) {
  return request({
    url: '/model/modelCollect/list',
    method: 'get',
    params: query
  })
}

// 查询模型收藏详细
export function getCollect(id) {
  return request({
    url: '/model/modelCollect/' + id,
    method: 'get'
  })
}

export function getCollectByModelId(query){
  return request({
    url: '/model/modelCollect/modelId',
    method: 'get',
    params:query
  })
}


// 新增模型收藏
export function addCollect(data) {
  return request({
    url: '/model/modelCollect',
    method: 'post',
    data: data
  })
}

export function addModelCollect(data) {
  return request({
    url: '/model/modelCollect/add',
    method: 'post',
    data: data
  })
}

// 修改模型收藏
export function updateCollect(data) {
  return request({
    url: '/model/modelCollect',
    method: 'put',
    data: data
  })
}

// 删除模型收藏
export function delCollect(id) {
  return request({
    url: '/model/modelCollect/' + id,
    method: 'delete'
  })
}

export function modelCollectCount(id){
  return request({
    url: '/model/modelCollect/count/' + id,
    method: 'get'
  })
}
